// 求 10000 以内 3 和 5 的倍数和，写出JavaScript实现函数
export function getCount () {
  let target = 10000
  let result = 0
  let intersection = 0
  let union = 0

  for (let i = 0; i <= target; i++) {
    if (i % 3 === 0 || i % 5 === 0) {
      intersection += i
    }
  }
  for (let i = 0; i <= target; i++) {
    if (i % 3 === 0 && i % 5 === 0) {
      union += i
    }
  }
  result = intersection - union
  return result
}
